package com.wh.codedemon.design.pattern.singleton;

/**
 * TODO
 * 构造函数私有化
 *
 * @auther whoo7
 * @date 2024/1/1 21:36
 */
public class HungrySingleton3 {
    private static HungrySingleton3 INSTANCE;

    private HungrySingleton3() {
    }

    public static synchronized HungrySingleton3 getInstance() {
        if (INSTANCE == null) {
            INSTANCE = new HungrySingleton3();
        }
        return INSTANCE;
    }
}
